import React from 'react';
import PropTypes from 'prop-types';
import i from '@/index.module.css';

export default function Icon({ className, active }) {
  if (active === 'empty') {
    return (
      <svg
        width="143px"
        height="108px"
        viewBox="0 0 143 108"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
        xmlnsXlink="http://www.w3.org/1999/xlink"
      >
        <title></title>
        <desc>Created with Sketch.</desc>
        <defs>
          <rect id="path-1" x="232" y="761" width="928" height="383" rx="2"></rect>
          <filter
            x="-1.0%"
            y="-2.2%"
            width="102.0%"
            height="105.0%"
            filterUnits="objectBoundingBox"
            id="filter-2"
          >
            <feOffset
              dx="0"
              dy="1"
              in="SourceAlpha"
              result="shadowOffsetOuter1"
            ></feOffset>
            <feGaussianBlur
              stdDeviation="3"
              in="shadowOffsetOuter1"
              result="shadowBlurOuter1"
            ></feGaussianBlur>
            <feColorMatrix
              values="0 0 0 0 0.819607843   0 0 0 0 0.843137255   0 0 0 0 0.874509804  0 0 0 0.601289336 0"
              type="matrix"
              in="shadowBlurOuter1"
            ></feColorMatrix>
          </filter>
        </defs>
        <g id="页面-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
          <g id="主页优化-空状态" transform="translate(-853.000000, -940.000000)">
            <g id="矩形备份-copy备份-7">
              <use
                fill="black"
                fillOpacity="1"
                filter="url(#filter-2)"
                xlinkHref="#path-1"
              ></use>
              <use fill="#FFFFFF" fillRule="evenodd" xlinkHref="#path-1"></use>
            </g>
            <rect
              id="Rectangle-Copy-4备份-Copy备份-3"
              stroke="#E7EAEF"
              fill="#FFFFFF"
              x="712.5"
              y="888.5"
              width="423"
              height="235"
            ></rect>
            <g id="编组-26备份" transform="translate(853.000000, 940.000000)">
              <image
                id="位图"
                x="0"
                y="0"
                width="143"
                height="108"
                xlinkHref=""
              ></image>
            </g>
          </g>
        </g>
      </svg>
    );
  } else if (active === 'alert1') {
    return (
      <svg
        width="42px"
        height="42px"
        viewBox="0 0 42 42"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
        xlink="http://www.w3.org/1999/xlink"
      >
        <g id="页面设计" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
          <g id="告警中心" transform="translate(-550.000000, -306.000000)">
            <g id="编组-14" transform="translate(551.000000, 307.000000)">
              <g id="编组-7" fill="#52A6FA" fillOpacity="0.1" stroke="#52A6FA">
                <circle id="椭圆形" cx="20" cy="20" r="20"></circle>
              </g>
              <g
                id="3.Icon/2.面性/1.基础通用类/警告"
                transform="translate(8.000000, 8.000000)"
              >
                <path
                  d="M12,6.75 C15.3137085,6.75 18,9.4362915 18,12.75 L17.9997597,19.49925 L19.5,19.5 L19.5,21 L4.5,21 L4.5,19.5 L5.99975974,19.49925 L6,12.75 C6,9.4362915 8.6862915,6.75 12,6.75 Z M13.1718017,10.681081 L9.5425588,14.72766 L11.6834455,14.72766 L10.7483634,17.796294 L14.4750546,13.7237826 L12.2716024,13.7237826 L13.1718017,10.681081 Z M18.5303301,5.15900974 L19.5909903,6.21966991 L17.4696699,8.34099026 L16.4090097,7.28033009 L18.5303301,5.15900974 Z M5.46966991,5.15900974 L7.59099026,7.28033009 L6.53033009,8.34099026 L4.40900974,6.21966991 L5.46966991,5.15900974 Z M12.75,3 L12.75,6 L11.25,6 L11.25,3 L12.75,3 Z"
                  id="形状"
                  fill="#0B6FD6"
                  fillRule="evenodd"
                ></path>
                <rect
                  id="矩形-copy-67"
                  transform="translate(12.000000, 12.000000) scale(-1, -1) rotate(-90.000000) translate(-12.000000, -12.000000) "
                  x="0"
                  y="0"
                  width="24"
                  height="24"
                ></rect>
              </g>
            </g>
          </g>
        </g>
      </svg>
    );
  } else if (active === 'alert3') {
    return (
      <svg
        width="42px"
        height="42px"
        viewBox="0 0 42 42"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
        xlink="http://www.w3.org/1999/xlink"
      >
        <g id="页面设计" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
          <g id="告警中心" transform="translate(-841.000000, -306.000000)">
            <g id="编组-15" transform="translate(842.000000, 307.000000)">
              <g id="编组-7" fill="#52A6FA" fillOpacity="0.1" stroke="#52A6FA">
                <circle id="椭圆形" cx="20" cy="20" r="20"></circle>
              </g>
              <g
                id="3.Icon/2.面性/4.操作编辑类/风险"
                transform="translate(8.000000, 8.000000)"
              >
                <path
                  d="M12.6582302,4.13856094 L20.9082302,19.1385609 C21.1831419,19.6384004 20.8215207,20.25 20.2510683,20.25 L3.7510683,20.25 C3.18061595,20.25 2.81899469,19.6384004 3.09390637,19.1385609 L11.3439064,4.13856094 C11.6288511,3.62047969 12.3732855,3.62047969 12.6582302,4.13856094 Z M12.75,9.75 L12.75,14.25 L11.25,14.25 L11.25,9.75 L12.75,9.75 Z M11.25,15.75 L12.75,15.75 L12.75,17.25 L11.25,17.25 L11.25,15.75 Z"
                  id="形状"
                  fill="#0B6FD6"
                  fillRule="evenodd"
                ></path>
                <rect
                  id="矩形"
                  fillRule="nonzero"
                  x="0"
                  y="0"
                  width="24"
                  height="24"
                ></rect>
              </g>
            </g>
          </g>
        </g>
      </svg>
    );
  } else if (active === 'alert2') {
    return (
      <svg
        width="42px"
        height="42px"
        viewBox="0 0 42 42"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
        xlink="http://www.w3.org/1999/xlink"
      >
        <g id="页面设计" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
          <g id="告警中心" transform="translate(-1132.000000, -306.000000)">
            <g id="编组-16" transform="translate(1133.000000, 307.000000)">
              <g id="编组-7" fill="#52A6FA" fillOpacity="0.1" stroke="#52A6FA">
                <circle id="椭圆形" cx="20" cy="20" r="20"></circle>
              </g>

              <g
                id="3.Icon/2.面性/1.基础通用类/时间"
                transform="translate(8.000000, 8.000000)"
              >
                <path
                  d="M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12.75,6.75 L11.25,6.75 L11.25,12.75 L17.25,12.75 L17.25,11.25 L12.75,11.24925 L12.75,6.75 Z"
                  id="形状"
                  fill="#0B6FD6"
                  fillRule="evenodd"
                ></path>

                <rect id="矩形-copy-61" x="0" y="0" width="24" height="24"></rect>
              </g>
            </g>
          </g>
        </g>
      </svg>
    );
  } else if (active === 'gou') {
    return (
      <svg
        width="16px"
        height="16px"
        viewBox="0 0 16 16"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
        xlink="http://www.w3.org/1999/xlink"
      >
        <g id="页面设计" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
          <g id="用户管理" transform="translate(-484.000000, -234.000000)">
            <g id="编组-9" transform="translate(184.000000, 218.000000)">
              <g id="编组-16" transform="translate(298.000000, 14.000000)">
                <g id="3.Icon/2.面性/4.操作编辑类/正确">
                  <path
                    d="M10,2.5 C14.1421356,2.5 17.5,5.85786438 17.5,10 C17.5,14.1421356 14.1421356,17.5 10,17.5 C5.85786438,17.5 2.5,14.1421356 2.5,10 C2.5,5.85786438 5.85786438,2.5 10,2.5 Z M13.5799513,7.65165043 L9.16,12.070625 L6.50888348,9.41941738 L5.625,10.3033009 L9.16053391,13.8388348 L14.4638348,8.53553391 L13.5799513,7.65165043 Z"
                    id="形状"
                    fill="#1890ff"
                    fillRule="evenodd"
                  ></path>
                  <rect
                    id="矩形-copy-68"
                    x="0"
                    y="0"
                    width="20"
                    height="20"
                  ></rect>
                </g>
              </g>
            </g>
          </g>
        </g>
      </svg>
    );
  }else if( active === 'once'){
    return <svg className={i.vam} width="14px" height="16px" viewBox="0 0 14 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink">
      <title></title>
      <desc>Created with Sketch.</desc>
      <g id="页面-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
        <g id="监测列表（未选中删除）" transform="translate(-1127.000000, -683.000000)">
          <g id="编组-7" transform="translate(1126.000000, 683.000000)">
            <rect id="矩形" fillOpacity="0" fill="#D8D8D8" x="0" y="0" width="16" height="16"></rect>
            <g id="编组-5" transform="translate(2.000000, 0.666667)" fill="#0B6FD6">
              <g id="编组" fillRule="nonzero" stroke="#0B6FD6" strokeWidth="0.5">
                <path d="M10.9619727,2.33460677 L9.30124479,2.33460677 C9.29149089,1.66634245 8.7515599,1.12411979 8.08398307,1.11145833 C8.01869922,0.487752604 7.48979687,1.18423789e-14 6.84907552,1.18423789e-14 L5.33086068,1.18423789e-14 C4.69016797,1.18423789e-14 4.1612513,0.487752604 4.09596745,1.11145833 C3.42844792,1.12417708 2.88844531,1.66638542 2.87870573,2.33460677 L1.21799219,2.33460677 C0.545316406,2.33460677 -7.10542736e-15,2.87992318 -7.10542736e-15,3.55261328 L-7.10542736e-15,13.4484883 C-7.10542736e-15,14.1211784 0.545316406,14.6664948 1.21799219,14.6664948 L10.9619727,14.6664948 C11.6346341,14.6664948 12.1799648,14.1211784 12.1799648,13.4484883 L12.1799648,3.55261328 C12.1799648,2.87992318 11.6346341,2.33460677 10.9619727,2.33460677 Z M4.11992969,1.97058984 L4.51888021,1.97058984 C4.75616797,1.97058984 4.94855339,1.77821875 4.94855339,1.54090234 L4.94855339,1.24169661 C4.94855339,1.0308776 5.12007031,0.859375 5.33086068,0.859375 L6.84907552,0.859375 C7.05989453,0.859375 7.23139714,1.03089193 7.23139714,1.24169661 L7.23139714,1.54091667 C7.23139714,1.77821875 7.42378255,1.97060417 7.66108464,1.97060417 L8.06003516,1.97060417 C8.26470964,1.97060417 8.43228776,2.13228125 8.44188411,2.33462109 C8.44217057,2.34069401 8.44234245,2.34678125 8.44234245,2.35292578 L8.44234245,3.34160807 C8.44234245,3.55241276 8.27083984,3.72391536 8.06003516,3.72391536 L4.11992969,3.72391536 C3.90911068,3.72391536 3.73760807,3.55241276 3.73760807,3.34160807 L3.73760807,2.35292578 C3.73760807,2.34678125 3.73777995,2.34069401 3.73806641,2.33462109 C3.74764844,2.13226693 3.91525521,1.97058984 4.11992969,1.97058984 Z M11.3205898,13.4484883 C11.3205898,13.6462305 11.1597292,13.8071198 10.9619727,13.8071198 L1.21799219,13.8071198 C1.02023568,13.8071198 0.859360677,13.6462305 0.859360677,13.4484883 L0.859360677,3.55261328 C0.859360677,3.35485677 1.02023568,3.19396745 1.21799219,3.19396745 L2.8782474,3.19396745 L2.8782474,3.34159375 C2.8782474,4.02625781 3.43526562,4.58326172 4.11992969,4.58326172 L8.06003516,4.58326172 C8.74471354,4.58326172 9.30170312,4.02625781 9.30170312,3.34159375 L9.30170312,3.19396745 L10.9619727,3.19396745 C11.1597292,3.19396745 11.3205898,3.35485677 11.3205898,3.55261328 L11.3205898,13.4484883 L11.3205898,13.4484883 Z" id="形状"></path>
              </g>
              <path d="M7.0072853,6.96327708 C7.06797659,7.06839748 7.09324325,7.18424933 7.08678924,7.29700923 L7.08503588,11.4 C7.08503588,11.7313708 6.81640673,12 6.48503588,12 C6.15366503,12 5.88503588,11.7313708 5.88503588,11.4 L5.88439928,8.3041769 L5.51749947,8.51622566 C5.23052389,8.68191108 4.86356965,8.58358599 4.69788423,8.29661041 C4.5321988,8.00963484 4.63052389,7.6426806 4.91749947,7.47699517 L6.18767006,6.74366184 C6.47464563,6.57797641 6.84159988,6.67630151 7.0072853,6.96327708 Z" id="形状结合"></path>
            </g>
          </g>
        </g>
      </g>
    </svg>
  }else if( active === 'cycle'){
    return <svg className={i.vam} width="14px" height="16px" viewBox="0 0 14 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink">
      <title></title>
      <desc>Created with Sketch.</desc>
      <g id="页面-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
        <g id="监测列表（未选中删除）" transform="translate(-1153.000000, -683.000000)">
          <g id="编组-8备份" transform="translate(1152.000000, 683.000000)">
            <rect id="矩形" fillOpacity="0" fill="#D8D8D8" x="0" y="0" width="16" height="16"></rect>
            <g id="编组-6" transform="translate(2.000000, 0.666667)" fillRule="nonzero" stroke="#0B6FD6">
              <g id="编组备份" fill="#0B6FD6" strokeWidth="0.5">
                <path d="M10.9619727,2.33460677 L9.30124479,2.33460677 C9.29149089,1.66634245 8.7515599,1.12411979 8.08398307,1.11145833 C8.01869922,0.487752604 7.48979687,0 6.84907552,0 L5.33086068,0 C4.69016797,0 4.1612513,0.487752604 4.09596745,1.11145833 C3.42844792,1.12417708 2.88844531,1.66638542 2.87870573,2.33460677 L1.21799219,2.33460677 C0.545316406,2.33460677 0,2.87992318 0,3.55261328 L0,13.4484883 C0,14.1211784 0.545316406,14.6664948 1.21799219,14.6664948 L10.9619727,14.6664948 C11.6346341,14.6664948 12.1799648,14.1211784 12.1799648,13.4484883 L12.1799648,3.55261328 C12.1799648,2.87992318 11.6346341,2.33460677 10.9619727,2.33460677 Z M4.11992969,1.97058984 L4.51888021,1.97058984 C4.75616797,1.97058984 4.94855339,1.77821875 4.94855339,1.54090234 L4.94855339,1.24169661 C4.94855339,1.0308776 5.12007031,0.859375 5.33086068,0.859375 L6.84907552,0.859375 C7.05989453,0.859375 7.23139714,1.03089193 7.23139714,1.24169661 L7.23139714,1.54091667 C7.23139714,1.77821875 7.42378255,1.97060417 7.66108464,1.97060417 L8.06003516,1.97060417 C8.26470964,1.97060417 8.43228776,2.13228125 8.44188411,2.33462109 C8.44217057,2.34069401 8.44234245,2.34678125 8.44234245,2.35292578 L8.44234245,3.34160807 C8.44234245,3.55241276 8.27083984,3.72391536 8.06003516,3.72391536 L4.11992969,3.72391536 C3.90911068,3.72391536 3.73760807,3.55241276 3.73760807,3.34160807 L3.73760807,2.35292578 C3.73760807,2.34678125 3.73777995,2.34069401 3.73806641,2.33462109 C3.74764844,2.13226693 3.91525521,1.97058984 4.11992969,1.97058984 Z M11.3205898,13.4484883 C11.3205898,13.6462305 11.1597292,13.8071198 10.9619727,13.8071198 L1.21799219,13.8071198 C1.02023568,13.8071198 0.859360677,13.6462305 0.859360677,13.4484883 L0.859360677,3.55261328 C0.859360677,3.35485677 1.02023568,3.19396745 1.21799219,3.19396745 L2.8782474,3.19396745 L2.8782474,3.34159375 C2.8782474,4.02625781 3.43526562,4.58326172 4.11992969,4.58326172 L8.06003516,4.58326172 C8.74471354,4.58326172 9.30170313,4.02625781 9.30170313,3.34159375 L9.30170313,3.19396745 L10.9619727,3.19396745 C11.1597292,3.19396745 11.3205898,3.35485677 11.3205898,3.55261328 L11.3205898,13.4484883 L11.3205898,13.4484883 Z" id="形状"></path>
              </g>
              <path d="M6.28592593,6.33333333 C7.18635883,6.33333333 8.01932673,6.79434419 8.50007474,7.55208422 L8.60368555,6.99954324 C8.62975888,6.86399434 8.72604253,6.78067249 8.82024959,6.81631788 C8.91445666,6.85196327 8.97133365,6.98896006 8.94526032,7.12450895 L8.78822704,7.97179293 L8.78647938,7.98378517 C8.78611799,7.98780775 8.78555309,7.99183318 8.78477841,7.99585495 C8.78291682,8.10250537 8.64927308,8.17129455 8.5172841,8.14528336 L8.45108275,8.14412781 L7.64280534,7.97592173 C7.51081635,7.94991054 7.42971943,7.85366573 7.46447484,7.75944313 C7.49923025,7.66522053 7.63266714,7.6082814 7.76465613,7.63429259 L8.17066667,7.71233333 L8.14200366,7.66647429 C7.46963243,6.69641672 6.15607086,6.40856683 5.12444444,7.02074074 C4.95851852,7.11555556 4.81629629,7.23407408 4.67407408,7.36444444 C3.79703704,8.25333333 3.79703704,9.68740741 4.68592593,10.5644444 C5.57481482,11.4414815 7.00888889,11.4414815 7.88592593,10.5525926 C8.0162963,10.4222222 8.12296297,10.28 8.21777778,10.1377778 C8.26518518,10.0548148 8.37185185,10.0311111 8.46666667,10.0785185 C8.54962963,10.1259259 8.57333333,10.2444444 8.52592593,10.3274074 C8.05185186,11.0859259 7.19851852,11.5718519 6.28592593,11.5718519 C4.84,11.5718519 3.66666667,10.3985185 3.66666667,8.95259259 C3.66666667,7.50666667 4.84,6.33333333 6.28592593,6.33333333 Z" id="形状结合" strokeWidth="0.666666667"></path>
            </g>
          </g>
        </g>
      </g>
    </svg>
  }
}

Icon.propTypes = {
  className: PropTypes.string,
};
